# coding: utf-8
from . import db, BaseModel


class User(db.Model):
    __tablename__ = 'user'

    auto_id = db.Column(db.BigInteger, primary_key=True)
    user_id = db.Column(db.Integer, info='用户id')
    user_name = db.Column(db.String(30, 'utf8_general_ci'), info='用户名')
    user_head = db.Column(db.String(255, 'utf8mb4_general_ci'), info='用户头像')
    user_account = db.Column(db.String(50, 'utf8mb4_general_ci'), info='用户账号')
    user_password = db.Column(db.String(255, 'utf8mb4_general_ci'), info='用户账号密码')
    administrator_id = db.Column(db.Integer, info='删除用户的管理员id')
    is_delete = db.Column(db.Integer, server_default=db.FetchedValue(), info='是否删除')
    create_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='创建记录时间')
    update_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='更新记录时间')
